import { createRouter, createWebHashHistory } from 'vue-router'

// console.log(import.meta.env.BASE_URL)
const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: '/',
      name: 'root',
      redirect: { name: 'home' }
    },
    {
      name: 'home',
      path: '/home',
      component: () => import('@renderer/view/Home.vue')
    },
    {
      name: 'setting',
      path: '/setting',
      component: () => import('@renderer/view/setting/Index.vue')
    },
    {
      name: 'toolbox',
      path: '/toolbox',
      children: [
        {
          name: 'download',
          path: '/download',
          component: () => import('@renderer/view/download/Index.vue')
        }
      ]
    }
  ]
})

export { router }
